<?php
/**
 * 我要询价列表页
 */
class MyQuoted extends BaseAction
{
	/**
	 * 初始化
	 */
	public function _init()
	{
         #登录状态可以看到本身所有状态的信息
		$intLoadId = $this->session()->getSession('front_uid');
		
		if(empty($intLoadId)){
			$this->alertGoto('请先登录再访问!','http://www.gzcanr.com/cooperate/');
		}
	}

	/**
	 * 默认动作
	 */
	protected function _default()
	{
        #登录状态可以看到本身所有状态的信息
		$intLoadId = $this->session()->getSession('front_uid');
		
		if(empty($intLoadId)){
			$this->goTo301('http://www.gzcanr.com/cooperate/');
		}
		
        if($intLoadId){
			$where='';
			$where.='sc_enquiry.userId = '.$intLoadId;
			$strWhere=$where;
//			$list = new publicGetDataModel();
//			$myQuotedData = $list->getData($where = $strWhere,$limit = 10,$fields = 'id,projectName,projectType,projectArea,countryCode,address,companyName,linkman,mobile,tel,email,leaveWord,quoteStatus,firstTime ',$order = 'id',$table='sc_enquiry');


			$sql='select sc_enquiry.id ,linkman,projectName,projectArea,projectType,countryCode,address,sc_enquiry.firstTime,quoteStatus  from sc_enquiry ,sc_enquiry_product
  where '.$strWhere.'  and linkman!=\' \'  and sc_enquiry_product.enqId = sc_enquiry.id group by sc_enquiry.id  ORDER BY sc_enquiry.firstTime desc ';
			$myQuotedData=DB::select($sql);


		}

		if($myQuotedData){
			foreach($myQuotedData as $k=>$v){
				//地区处理
				if(!empty($myQuotedData[$k]['COUNTRYCODE'])){
					#获取地区信息
					#省份信息
					include_once(SYSTEM_PATH.'libs/data/province.lib.php');
					$strProvince = '';
					if( $myQuotedData[$k]['COUNTRYCODE']){
						$area_len = mb_strlen( $myQuotedData[$k]['COUNTRYCODE']);
						if($area_len==6){
							$strProvince = $Province2[ $myQuotedData[$k]['COUNTRYCODE']];
						}elseif ($area_len==9){
							$strProvince = $Province2[substr( $myQuotedData[$k]['COUNTRYCODE'],0,6)].$City[substr( $myQuotedData[$k]['COUNTRYCODE'],0,6)][ $myQuotedData[$k]['COUNTRYCODE']];
						}elseif ($area_len==12){
							$strProvince = $Province2[substr( $myQuotedData[$k]['COUNTRYCODE'],0,6)].$City[substr( $myQuotedData[$k]['COUNTRYCODE'],0,6)][substr( $myQuotedData[$k]['COUNTRYCODE'],0,9)].$County[substr( $myQuotedData[$k]['COUNTRYCODE'],0,9)][ $myQuotedData[$k]['COUNTRYCODE']];
						}
						$myQuotedData[$k]['AREAINFO'] = $strProvince;
//					print_r($strProvince);
					}



				}
			}









		}
//		print_r($myQuotedData);
//DB::echoExeSql();
		$this->assign('myQuotedData',$myQuotedData);
		$this->tpl_full_path('/front/cooperate/myQuoted');
	}





	/**
	 * 详情页
	 */
	protected function _detailMyQuoted()
	{
		#登录状态可以看到本身所有状态的信息
		$intLoadId = $this->session()->getSession('front_uid');
		if(empty($intLoadId)){
			$this->goTo301('http://www.gzcanr.com/cooperate/');
		}
		#获取到参数
		$intId = $this->getParam('id');
		if(empty($intId) || !is_numeric($intId)){
			$this->goTo404();
		}
        #获取报价详情
		$where='';
		$where.=' enqId = '.$intId;
		$where.=' and userId = '.$intLoadId;
		$strWhere=$where;
		$list = new publicGetDataModel();
		$projectData = $list->getData($where = $strWhere,$limit = 200,$fields = 'id,enqId,productAttr,firstTime,quote_price,quote_time',$order = 'quote_time',$table='sc_enquiry_product');
		
		#获取询价信息
		$sqlXun = 'select id,userId,projectName,projectType,projectArea,countryCode,address,firstTime from sc_enquiry where id = '.$intId.' limit 1';
		$arrXumData = DB::select($sqlXun);
		if($arrXumData){
			$arrXumData = $arrXumData[0];
			$this->assign('arrXumData',$arrXumData);
		}

		if($projectData){
			foreach($projectData as $k=>$v){
				$projectData[$k]['SERPRODUCTATTR'] = unserialize($projectData[$k]['PRODUCTATTR'] );
			}
		}else{
			$this->goTo404('该信息不存在!');
		}
 
		$this->assign('projectData',$projectData);
//		print_r($projectData);
		$this->tpl_full_path('/front/cooperate/detailMyQuoted');
	}



	/**
	 * 我要询价第一步
	 */
	protected function _enquiry1()
	{

		if($_SERVER["REQUEST_METHOD"] === "POST"   && $_POST['enquiry1']==1){
 
			$data['projectName'] = $this->getParam('projectName','t');#
			$data['projectType'] = $this->getParam('projectType');#
			$data['projectArea'] = $this->getParam('projectArea','t');#
			$data['countryCode']=$this->getParam('hidden_countrycode','i');
			$data['address'] = $this->getParam('address','t');#
			$data['firstTime'] = time();#


			$intLoadId = $this->session()->getSession('front_uid');

			$data['userId'] = $intLoadId;#
			$data['company'] = '999';#
			$data['content'] = '999';#

			$id=DB::insert("sc_enquiry",$data,true);

			if($id ){

				$url='http://www.gzcanr.com/cooperate/myQuoted-cmd-enquiry2-id-'.$id.'.html';
				$this->goTo301($url);
			}else{
				$this->alertBack("保存失败,请重试！");
			}



		}



		$this->tpl_full_path('/front/cooperate/enquiry1');
	}





	/**
	 * 我要询价第二步
	 */
	protected function _enquiry2()
	{



		$this->tpl_full_path('/front/cooperate/enquiry2');
	}

	/**
	 * 我要询价第三步
	 */
	protected function _enquiry3()
	{

		$id = $this->getParam('id','i');
		if($_SERVER["REQUEST_METHOD"] === "POST"   && $_POST['enquiry3']==3) {
			if ($id > 0) {
				$data['companyName'] = $this->getParam('companyName', 't');#
				$data['linkman'] = $this->getParam('linkman', 't');#
				$data['tel'] = $this->getParam('tel', 't');#
				$data['mobile'] = $this->getParam('mobile', 't');#
				$data['email'] = $this->getParam('email', 't');#
				$data['leaveWord'] = $this->getParam('leaveWord', 't');#
				$data['firstTime'] = time();#


				$sql = "update sc_enquiry set companyName = '" . $data['companyName'] . "' ,  linkman='" . $data['linkman'] . "', tel='" . $data['tel'] . " ' , mobile='" . $data['mobile'] . " ' ,
			email='" . $data['email'] . "'  ,   leaveWord='" . $data['leaveWord'] . " ' ,   firstTime='" . $data['firstTime'] . " '        where id = " . $id;


				if(DB::execute($sql)){

					$message="提交成功,我司人员将在1个工作日内与您联系~！";
					$url='http://www.gzcanr.com/cooperate/myQuoted.html';
					$this->alertGoto($message,$url);



				}else{
					$this->alertBack("保存失败,请重试！");
				}


			}

		}

		$this->tpl_full_path('/front/cooperate/enquiry3');
	}




	/**
	 * 获取到产品分类下的内容
	 */
	protected function _show(){
		$isShowWhichType= $this->getParam('isShowWhichType');

		$list= $this->getParam('list');

		$arrList=explode(",",$list);


		$strTH = "";
		if($isShowWhichType=='1'){
			$strTH.='<div><i>*</i><span>材料类型：</span></div>';
			$strTH.='<div class="check-list typeRadio" id="materialList">';
			foreach($arrList as $k=>$v){
				$k1=$k+1;
				$strTH.='<label>';
				$strTH.='<input   type="radio" name="materialType" class="materialList"  value="'.$k1.'"  onclick=showTJXandCLtypeThird(this) />';
				$strTH.='<span>'.$v.'</span>';
				$strTH.='</label>';
			}
			$strTH.='</div>';
		}elseif($isShowWhichType=='2'){
			$strTH.='<div><i>*</i><span>选择灯具类型：</span></div>';
			$strTH.='            <div class="check-list typeRadio">
                <label>
                    <input type="radio" name="luminaireType"   class="luminaireType" value="1" />
                    <span>LED平板灯</span>
                </label>
                <label>
                    <input type="radio" name="luminaireType" class="luminaireType"  value="2" />
                    <span>光管式LED灯</span>
                </label>
                <label>
                    <input type="radio" name="luminaireType" class="luminaireType"  value="3" />
                    <span>反光罩式荧光灯</span>
                </label>

            </div>';

		}elseif($isShowWhichType=='3'){
			$strTH.=' <div><i>*</i><span>选择风口类型：</span></div>';
			$strTH.='  <div class="check-list typeRadio">
                <label>
                    <input type="radio" name="tuyereType" class="tuyereType" value="1" />
                    <span>流线型侧吹风口</span>
                </label>
                <label>
                    <input type="radio" name="tuyereType" class="tuyereType" value="2" />
                    <span>零度风口</span>
                </label>
                <label>
                    <input type="radio" name="tuyereType" class="tuyereType" value="3" />
                    <span>开孔式风口</span>
                </label>

            </div>';
		}


		$isShowProductType= $this->getParam('isShowProductType');
		$sortVal= $this->getParam('sortVal');


		if($isShowProductType=='1'&&$sortVal=='1'){//天花
			$strTH.='<li id="productType"  >';
			$strTH.='<div><i>*</i><span>产品类型：</span></div>';
			$strTH.=' <select  class="web-input productTypeSelect" name="productType" id="productTypeSelect"  onchange="showBelow(this)">';
			$strTH.=' <option value="0">请选择</option>';
			$strTH.=' <option value="1">标准版</option>';
			$strTH.=' <option value="2">铝单板</option>';
			$strTH.=' <option value="3">蜂窝板</option>';
			$strTH.=' <option value="4">瓦楞板</option>';
			$strTH.=' <option value="5">U形方通</option>';
			$strTH.=' <option value="6">条扣板</option>';
			$strTH.=' </select>';
			$strTH.='</li>';

		}
//		elseif($isShowProductType=='1'&&$sortVal=='2'){//墙板
//			$strTH.='<li id="productType"  >';
//			$strTH.='<div><i>*</i><span>产品类型：</span></div>';
//			$strTH.=' <select  class="web-input" name="productType" id="productTypeSelect" onclick="showBelow($(this))">';
//			$strTH.=' <option value="0">请选择</option>';
//
//			$strTH.=' <option value="3">蜂窝板</option>';
//			$strTH.=' <option value="4">钢板复合</option>';
//		 ;
//			$strTH.=' </select>';
//			$strTH.='</li>';
//
//		}
		elseif($isShowProductType=='1'&&$sortVal=='3'){//灯具
			$strTH.='<li id="productType"  >';
			$strTH.='<div><i>*</i><span>材料类型：</span></div>';
			$strTH.=' <select  class="web-input productTypeSelect" name="productType" id="productTypeSelect" onchange="showBelow(this)">';
			$strTH.=' <option value="0">请选择</option>';

			$strTH.=' <option value="3">铝合金框</option>';
			$strTH.=' <option value="4">镀锌钢板</option>';
			;
			$strTH.=' </select>';
			$strTH.='</li>';

		}


		$isShowSize= $this->getParam('isShowSize');
		if($isShowSize=='1'){
			$strTH.='   <li class="raw" id="size"  >';
			$strTH.='  <div><i>*</i><span>尺寸：</span></div>';
			$strTH.='            <div class="check-list">
                <label>
                    <input type="radio" name="size" class="size" value="1" checked="checked" />
                    <span>200*1200</span>
                </label>
                <label>
                    <input type="radio" name="size"  class="size" value="2" />
                    <span>300*1200</span>
                </label>
                <label>
                    <input type="radio" name="size"  class="size" value="3" />
                    <span>400*1200</span>
                </label>

            </div>';
			$strTH.='  </li>';
		}


		$isShowPower= $this->getParam('isShowPower');
		if($isShowPower=='1'){
			$strTH.='   <li class="raw" id="power"  >';
			$strTH.='  <div><i>*</i><span>功率：</span></div>';
			$strTH.='            <div class="check-list">
                <label>
                    <input type="radio" name="power" class="power" value="1" checked="checked" />
                    <span>40W</span>
                </label>
                <label>
                    <input type="radio" name="power"  class="power" value="2" />
                    <span>30W</span>
                </label>
            </div>';
			$strTH.='  </li>';
		}



		$fitSmallpoxType= $this->getParam('fitSmallpoxType');//配合天花类型
		if($fitSmallpoxType=='1' ){
			$strTH.='<li id="fitSmallpoxType"  >';
			$strTH.='<div><i>*</i><span>配合天花类型：</span></div>';
			$strTH.=' <select  class="web-input fitSmallpoxType" name="fitSmallpoxType" id="fitSmallpoxType" >';
			$strTH.=' <option value="0">请选择</option>';
			$strTH.=' <option value="1">明架</option>';
			$strTH.=' <option value="2">暗架</option>';
			$strTH.=' <option value="3">半明半暗</option>';
			$strTH.=' <option value="4">勾搭式</option>';
			$strTH.=' <option value="5">挂搭式</option>';
			;
			$strTH.=' </select>';
			$strTH.='</li>';

		}


		$surfacePreparation= $this->getParam('surfacePreparation');//选择表面处理
		if($surfacePreparation=='1' ){
			$strTH.='<li id="surfacePreparation"  >';
			$strTH.='<div><i>*</i><span>选择表面处理：</span></div>';
			$strTH.=' <select  class="web-input surfacePreparationSelect" name="surfacePreparation" id="surfacePreparationSelect" >';
			$strTH.=' <option value="0">请选择</option>';
			$strTH.=' <option value="1">聚酯喷涂</option>';
			$strTH.=' <option value="2">氟碳喷涂</option>';
			$strTH.=' </select>';
			$strTH.='</li>';

		}


		$colorNum= $this->getParam('colorNum');//国际色号
		if($colorNum=='1' ){
			$strTH.=' <li id="colorNum"  >';
			$strTH.=' <div><i>*</i><span>国际色号：</span></div>';
			$strTH.='  <input type="text" class="web-input colorNum" name="colorNum"      />';
			$strTH.='  </li>';

		}


		$height= $this->getParam('height');
		if($height=='1'){
			$strTH.='   <li class="raw" id="height"  >';
			$strTH.='  <div><i>*</i><span>高度：</span></div>';
			$strTH.='            <div class="check-list">
                <label>
                    <input type="radio" name="tjxheight" class="tjxheight" value="1" checked="checked" />
                    <span>100mm</span>
                </label>

            </div>';
			$strTH.='  </li>';
		}





		echo $strTH;
		exit();
	}








/**
 * 获取到产品类型下的内容
 */
protected function _showBelow(){
	$sortVal= $this->getParam('sortVal');//用户选中的产品分类值
	$productTypeSelectVal= $this->getParam('productTypeSelectVal');//用户选中的产品类型值
	$materialType= $this->getParam('materialType');//用户选中的材料类型值


	$installation= $this->getParam('installation');

	$strTH = "";
	if($sortVal==1){//天花
		if($productTypeSelectVal==1){//天花下的标准版
			$strTH.='<li>';
			$strTH.='<div><i>*</i><span>安装方式：</span></div>';
			$strTH.='<div class="check-list installation" id="installation">';
			$strTH.='<label>';
			$strTH.='<input   type="radio" name="installation" class="installation"  value="1" />';
			$strTH.='<span>明架</span>';
			$strTH.='</label>';
			$strTH.='<label>';
			$strTH.='<input   type="radio" name="installation" class="installation"  value="2" />';
			$strTH.='<span>暗架</span>';
			$strTH.='</label>';
			$strTH.='<label>';
			$strTH.='<input   type="radio" name="installation" class="installation"  value="3" />';
			$strTH.='<span>半明半暗</span>';
			$strTH.='</label>';
			$strTH.='<label>';
			$strTH.='<input   type="radio" name="installation" class="installation"  value="4" />';
			$strTH.='<span>明架组合</span>';
			$strTH.='</label>';
			$strTH.='<label>';
			$strTH.='<input   type="radio" name="installation" class="installation"  value="5" />';
			$strTH.='<span>半明半暗组合</span>';
			$strTH.='</label>';
			$strTH.='<label>';
			$strTH.='<input   type="radio" name="installation" class="installation"  value="6" />';
			$strTH.='<span>多龙骨组合</span>';
			$strTH.='</label>';
			$strTH.='</div>';
			$strTH.='</li>';

		}elseif($productTypeSelectVal==2||$productTypeSelectVal==3||$productTypeSelectVal==4){//天花下的铝单板、蜂窝板、瓦楞板
			$strTH.='<li>';
			$strTH.='<div><i>*</i><span>安装方式：</span></div>';
			$strTH.='<div class="check-list installation" id="installation">';
			$strTH.='<label>';
			$strTH.='<input   type="radio" name="installation" class="installation"  value="1" />';
			$strTH.='<span>挂搭</span>';
			$strTH.='</label>';
			$strTH.='<label>';
			$strTH.='<input   type="radio" name="installation" class="installation"  value="2" />';
			$strTH.='<span>勾搭</span>';
			$strTH.='</label>';
			$strTH.='</div>';
			$strTH.='</li>';

		}else	if($productTypeSelectVal==5){//天花下的U形方通
			$strTH.='<li>';
			$strTH.='<div><i>*</i><span>安装方式：</span></div>';
			$strTH.='<div class="check-list installation" id="installation">';
			$strTH.='<label>';
			$strTH.='<input   type="radio" name="installation" class="installation"  value="1" />';
			$strTH.='<span>轻钢龙骨螺栓连接</span>';
			$strTH.='</label>';
			$strTH.='<label>';
			$strTH.='<input   type="radio" name="installation" class="installation"  value="2" />';
			$strTH.='<span>几字骨</span>';
			$strTH.='</label>';
			$strTH.='</div>';
			$strTH.='</li>';
		}else	if($productTypeSelectVal==6){//天花下的条扣板
			$strTH.='<li>';
			$strTH.='<div><i>*</i><span>安装方式：</span></div>';
			$strTH.='<div class="check-list installation" id="installation">';
			$strTH.='<label>';
			$strTH.='<input   type="radio" name="installation" class="installation"  value="1" />';
			$strTH.='<span>轻钢龙骨牙锯连接</span>';
			$strTH.='</label>';
			$strTH.='<label>';
			$strTH.='<input   type="radio" name="installation" class="installation"  value="2" />';
			$strTH.='<span>几字骨</span>';
			$strTH.='</label>';
			$strTH.='</div>';
			$strTH.='</li>';
		}



		if($productTypeSelectVal==1){//天花下的标准版
			$strTH.='<li id="surfacePreparation"  >';
			$strTH.='<div><i>*</i><span>选择表面处理：</span></div>';
			$strTH.=' <select  class="web-input surfacePreparationSelect" name="surfacePreparation" id="surfacePreparationSelect">';
			$strTH.=' <option value="0">请选择</option>';
			$strTH.=' <option value="1">聚酯喷涂</option>';
			$strTH.=' <option value="2">聚酯辊涂</option>';
			$strTH.=' <option value="3">氟碳喷涂</option>';
			$strTH.=' <option value="4">氟碳辊涂</option>';
			$strTH.=' <option value="5">木纹转印</option>';
			$strTH.=' </select>';
			$strTH.='</li>';
		}elseif($productTypeSelectVal==2){//天花下的铝单板
			$strTH.='<li id="surfacePreparation"  >';
			$strTH.='<div><i>*</i><span>选择表面处理：</span></div>';
			$strTH.=' <select  class="web-input surfacePreparationSelect" name="surfacePreparation" id="surfacePreparationSelect">';
			$strTH.=' <option value="0">请选择</option>';
			$strTH.=' <option value="1">聚酯喷涂</option>';
			$strTH.=' <option value="2">聚酯辊涂</option>';
			$strTH.=' <option value="3">氟碳喷涂</option>';
			$strTH.=' <option value="4">氟碳辊涂</option>';
			$strTH.=' <option value="5">木纹转印</option>';
			$strTH.=' <option value="6">阳极氧化</option>';
			$strTH.=' </select>';
			$strTH.='</li>';
		}elseif($productTypeSelectVal==3||$productTypeSelectVal==4||$productTypeSelectVal==5||$productTypeSelectVal==6){//天花下的蜂窝板、瓦楞板、U形方通、条扣板
			$strTH.='<li id="surfacePreparation"  >';
			$strTH.='<div><i>*</i><span>选择表面处理：</span></div>';
			$strTH.=' <select  class="web-input surfacePreparationSelect" name="surfacePreparation" id="surfacePreparationSelect">';
			$strTH.=' <option value="0">请选择</option>';
			$strTH.=' <option value="2">聚酯辊涂</option>';
			$strTH.=' <option value="4">氟碳辊涂</option>';
			$strTH.=' <option value="5">木纹转印</option>';
			$strTH.=' </select>';
			$strTH.='</li>';
		}





		if($productTypeSelectVal==1||$productTypeSelectVal==2||$productTypeSelectVal==3||$productTypeSelectVal==4||$productTypeSelectVal==5||$productTypeSelectVal==6){
			$strTH.=' <li id="colorNum"  >';
			$strTH.=' <div><i>*</i><span>国际色号：</span></div>';
			$strTH.='  <input type="text" class="web-input colorNum" name="colorNum"      />';
			$strTH.='  </li>';
		}


		if($productTypeSelectVal==1||$productTypeSelectVal==2||$productTypeSelectVal==3||$productTypeSelectVal==4){
			$strTH.=' <li id="standard"  >';
			$strTH.=' <div><i>*</i><span>规格：</span></div>';
			$strTH.='  <input type="text" class="web-input standard" name="standard"      />mm';
			$strTH.='  </li>';
		}

		if($productTypeSelectVal==5||$productTypeSelectVal==6){
			$strTH.=' <li id="bottomWidth"  >';
			$strTH.=' <div><i>*</i><span>底宽：</span></div>';
			$strTH.='  <input type="text" class="web-input bottomWidth" name="bottomWidth"      />mm';
			$strTH.='  </li>';

			$strTH.=' <li id="height"  >';
			$strTH.=' <div><i>*</i><span>高度：</span></div>';
			$strTH.='  <input type="text" class="web-input height" name="height"      />mm';
			$strTH.='  </li>';
		}

		if($productTypeSelectVal==1||$productTypeSelectVal==2||$productTypeSelectVal==5||$productTypeSelectVal==6){
			$strTH.=' <li id="thickness"  >';
			$strTH.=' <div><i>*</i><span>厚度：</span></div>';
			$strTH.='  <input type="text" class="web-input thickness" name="thickness"      />mm';
			$strTH.='  </li>';
		}

		if($productTypeSelectVal==3||$productTypeSelectVal==4){
			$strTH.=' <li id="panelThickness"  >';
			$strTH.=' <div><i>*</i><span>面板厚度：</span></div>';
			$strTH.='  <input type="text" class="web-input panelThickness" name="panelThickness"      />mm';
			$strTH.='  </li>';
		}

		if($productTypeSelectVal==3){


			$strTH.=' <li id="backplaneThickness"  >';
			$strTH.=' <div><i>*</i><span>背板厚度：</span></div>';
			$strTH.='  <input type="text" class="web-input backplaneThickness" name="backplaneThickness"      />mm';
			$strTH.='  </li>';

			$strTH.=' <li id="coreThickness"  >';
			$strTH.=' <div><i>*</i><span>芯材厚度：</span></div>';
			$strTH.='  <input type="text" class="web-input coreThickness" name="coreThickness"      />mm';
			$strTH.='  </li>';

			$strTH.=' <li id="totalThickness"  >';
			$strTH.=' <div><i>*</i><span>总厚度：</span></div>';
			$strTH.='  <input type="text" class="web-input totalThickness" name="totalThickness"      />mm';
			$strTH.='  </li>';


		}

		if($productTypeSelectVal==4){
			$strTH.=' <li id="corrugatedCoreThickness"  >';
			$strTH.=' <div><i>*</i><span>瓦楞芯厚度：</span></div>';
			$strTH.='  <input type="text" class="web-input corrugatedCoreThickness" name="corrugatedCoreThickness"      />mm';
			$strTH.='  </li>';

			$strTH.=' <li id="corrugatedCoreHeight"  >';
			$strTH.=' <div><i>*</i><span>瓦楞芯高度：</span></div>';
			$strTH.='  <input type="text" class="web-input corrugatedCoreHeight" name="corrugatedCoreHeight"      />mm';
			$strTH.='  </li>';
		}



	}//end天花


	if($sortVal==2) {//墙板
		if($materialType=='1'&&$productTypeSelectVal=='2'){//墙板下的铝合金的铝单板

			$strTH .= '<li>';
			$strTH .= '<div><i>*</i><span>安装方式：</span></div>';
			$strTH .= '<div class="check-list installation" id="installation">';
			$strTH .= '<label>';
			$strTH .= '<input   type="radio" name="installation" class="installation"  value="1" />';
			$strTH .= '<span>固定式</span>';
			$strTH .= '</label>';
			$strTH .= '<label>';
			$strTH .= '<input   type="radio" name="installation" class="installation"  value="2" />';
			$strTH .= '<span>可拆式</span>';
			$strTH .= '</label>';
			$strTH .= '</div>';
			$strTH .= '</li>';

			$strTH .= '<li id="surfacePreparation"  >';
			$strTH .= '<div><i>*</i><span>选择表面处理：</span></div>';
			$strTH .= ' <select  class="web-input surfacePreparationSelect" name="surfacePreparation" id="surfacePreparationSelect">';
			//			$strTH.=' <option value="0">请选择</option>';
			$strTH.=' <option value="1">聚酯喷涂</option>';
			$strTH.=' <option value="3">氟碳喷涂</option>';
			$strTH.=' <option value="5">木纹转印</option>';
			$strTH.=' <option value="6">阳极氧化</option>';
			$strTH .= ' </select>';
			$strTH .= '</li>';


			$strTH .= ' <li id="colorNum"  >';
			$strTH .= ' <div><i>*</i><span>国际色号：</span></div>';
			$strTH .= '  <input type="text" class="web-input colorNum" name="colorNum"      />';
			$strTH .= '  </li>';

			$strTH .= ' <li id="standard"  >';
			$strTH .= ' <div><i>*</i><span>规格：</span></div>';
			$strTH .= '  <input type="text" class="web-input standard" name="standard"      />mm';
			$strTH .= '  </li>';

			$strTH.=' <li id="thickness"  >';
			$strTH.=' <div><i>*</i><span>厚度：</span></div>';
			$strTH.='  <input type="text" class="web-input thickness" name="thickness"      />mm';
			$strTH.='  </li>';
		}



		if($materialType=='1'&&$productTypeSelectVal=='3') {//墙板下的铝合金的蜂窝板
			$strTH .= '<li>';
			$strTH .= '<div><i>*</i><span>安装方式：</span></div>';
			$strTH .= '<div class="check-list installation" id="installation">';
			$strTH .= '<label>';
			$strTH .= '<input   type="radio" name="installation" class="installation"  value="1" />';
			$strTH .= '<span>固定式</span>';
			$strTH .= '</label>';
			$strTH .= '<label>';
			$strTH .= '<input   type="radio" name="installation" class="installation"  value="2" />';
			$strTH .= '<span>可拆式</span>';
			$strTH .= '</label>';
			$strTH .= '</div>';
			$strTH .= '</li>';


			$strTH .= '<li id="surfacePreparation"  >';
			$strTH .= '<div><i>*</i><span>选择表面处理：</span></div>';
			$strTH .= ' <select  class="web-input surfacePreparationSelect" name="surfacePreparation" id="surfacePreparationSelect">';
			//			$strTH.=' <option value="0">请选择</option>';
			$strTH.=' <option value="1">聚酯辊涂</option>';
			$strTH.=' <option value="3">氟碳辊涂</option>';
			$strTH.=' <option value="5">木纹转印</option>';
			$strTH .= ' </select>';
			$strTH .= '</li>';



			$strTH .= ' <li id="colorNum"  >';
			$strTH .= ' <div><i>*</i><span>国际色号：</span></div>';
			$strTH .= '  <input type="text" class="web-input colorNum" name="colorNum"      />';
			$strTH .= '  </li>';

			$strTH .= ' <li id="standard"  >';
			$strTH .= ' <div><i>*</i><span>规格：</span></div>';
			$strTH .= '  <input type="text" class="web-input standard" name="standard"      />mm';
			$strTH .= '  </li>';

			$strTH .= ' <li id="panelThickness"  >';
			$strTH .= ' <div><i>*</i><span>面板厚度：</span></div>';
			$strTH .= '  <input type="text" class="web-input panelThickness" name="panelThickness"      />mm';
			$strTH .= '  </li>';

			$strTH .= ' <li id="backplaneThickness"  >';
			$strTH .= ' <div><i>*</i><span>背板厚度：</span></div>';
			$strTH .= '  <input type="text" class="web-input backplaneThickness" name="backplaneThickness"      />mm';
			$strTH .= '  </li>';

			$strTH .= ' <li id="coreThickness"  >';
			$strTH .= ' <div><i>*</i><span>芯材厚度：</span></div>';
			$strTH .= '  <input type="text" class="web-input coreThickness" name="coreThickness"      />mm';
			$strTH .= '  </li>';

			$strTH .= ' <li id="totalThickness"  >';
			$strTH .= ' <div><i>*</i><span>总厚度：</span></div>';
			$strTH .= '  <input type="text" class="web-input totalThickness" name="totalThickness"      />mm';
			$strTH .= '  </li>';
		}




		if($materialType=='1'&&$productTypeSelectVal=='4') {//墙板下的铝合金的铝板复合
			$strTH .= '<li>';
			$strTH .= '<div><i>*</i><span>安装方式：</span></div>';
			$strTH .= '<div class="check-list installation" id="installation">';
			$strTH .= '<label>';
			$strTH .= '<input   type="radio" name="installation" class="installation"  value="1" />';
			$strTH .= '<span>固定式</span>';
			$strTH .= '</label>';
			$strTH .= '<label>';
			$strTH .= '<input   type="radio" name="installation" class="installation"  value="2" />';
			$strTH .= '<span>可拆式</span>';
			$strTH .= '</label>';
			$strTH .= '</div>';
			$strTH .= '</li>';


			$strTH .= '<li id="surfacePreparation"  >';
			$strTH .= '<div><i>*</i><span>选择表面处理：</span></div>';
			$strTH .= ' <select  class="web-input surfacePreparationSelect" name="surfacePreparation" id="surfacePreparationSelect">';
			//			$strTH.=' <option value="0">请选择</option>';
			$strTH.=' <option value="1">聚酯喷涂</option>';
			$strTH.=' <option value="3">氟碳喷涂</option>';
			$strTH.=' <option value="5">木纹转印</option>';
			$strTH.=' <option value="6">阳极氧化</option>';
			$strTH .= ' </select>';
			$strTH .= '</li>';



			$strTH .= ' <li id="colorNum"  >';
			$strTH .= ' <div><i>*</i><span>国际色号：</span></div>';
			$strTH .= '  <input type="text" class="web-input colorNum" name="colorNum"      />';
			$strTH .= '  </li>';

			$strTH .= ' <li id="standard"  >';
			$strTH .= ' <div><i>*</i><span>规格：</span></div>';
			$strTH .= '  <input type="text" class="web-input standard" name="standard"      />mm';
			$strTH .= '  </li>';

			$strTH .= ' <li id="liningMaterial"  >';
			$strTH .= ' <div><i>*</i><span>衬板材料：</span></div>';
			$strTH .= '  <input type="text" class="web-input liningMaterial" name="liningMaterial"      />';
			$strTH .= '  </li>';

			$strTH .= ' <li id="liningThickness"  >';
			$strTH .= ' <div><i>*</i><span>衬板厚度：</span></div>';
			$strTH .= '  <input type="text" class="web-input liningThickness" name="liningThickness"      />mm';
			$strTH .= '  </li>';

			$strTH .= ' <li id="aluminumPlateThickness"  >';
			$strTH .= ' <div><i>*</i><span>铝板厚度：</span></div>';
			$strTH .= '  <input type="text" class="web-input aluminumPlateThickness" name="aluminumPlateThickness"      />mm';
			$strTH .= '  </li>';

		}


		if($materialType=='3'&&$productTypeSelectVal=='2') {//墙板下的镀锌钢板的蜂窝板
			$strTH .= '<li>';
			$strTH .= '<div><i>*</i><span>安装方式：</span></div>';
			$strTH .= '<div class="check-list installation" id="installation">';
			$strTH .= '<label>';
			$strTH .= '<input   type="radio" name="installation" class="installation"  value="1" />';
			$strTH .= '<span>固定式</span>';
			$strTH .= '</label>';
			$strTH .= '<label>';
			$strTH .= '<input   type="radio" name="installation" class="installation"  value="2" />';
			$strTH .= '<span>可拆式</span>';
			$strTH .= '</label>';
			$strTH .= '</div>';
			$strTH .= '</li>';


			$strTH .= '<li id="surfacePreparation"  >';
			$strTH .= '<div><i>*</i><span>选择表面处理：</span></div>';
			$strTH .= ' <select  class="web-input surfacePreparationSelect" name="surfacePreparation" id="surfacePreparationSelect">';
			//			$strTH.=' <option value="0">请选择</option>';
			$strTH.=' <option value="1">聚酯辊涂</option>';
			$strTH.=' <option value="3">氟碳辊涂</option>';
			$strTH.=' <option value="5">木纹转印</option>';
			$strTH .= ' </select>';
			$strTH .= '</li>';

			$strTH .= ' <li id="colorNum"  >';
			$strTH .= ' <div><i>*</i><span>国际色号：</span></div>';
			$strTH .= '  <input type="text" class="web-input colorNum" name="colorNum"      />';
			$strTH .= '  </li>';

			$strTH .= ' <li id="standard"  >';
			$strTH .= ' <div><i>*</i><span>规格：</span></div>';
			$strTH .= '  <input type="text" class="web-input standard" name="standard"      />mm';
			$strTH .= '  </li>';

			$strTH .= ' <li id="panelThickness"  >';
			$strTH .= ' <div><i>*</i><span>面板厚度：</span></div>';
			$strTH .= '  <input type="text" class="web-input panelThickness" name="panelThickness"      />mm';
			$strTH .= '  </li>';

			$strTH .= ' <li id="backplaneThickness"  >';
			$strTH .= ' <div><i>*</i><span>背板厚度：</span></div>';
			$strTH .= '  <input type="text" class="web-input backplaneThickness" name="backplaneThickness"      />mm';
			$strTH .= '  </li>';

			$strTH .= ' <li id="coreThickness"  >';
			$strTH .= ' <div><i>*</i><span>芯材厚度：</span></div>';
			$strTH .= '  <input type="text" class="web-input coreThickness" name="coreThickness"      />mm';
			$strTH .= '  </li>';

			$strTH .= ' <li id="totalThickness"  >';
			$strTH .= ' <div><i>*</i><span>总厚度：</span></div>';
			$strTH .= '  <input type="text" class="web-input totalThickness" name="totalThickness"      />mm';
			$strTH .= '  </li>';
		}



		if($materialType=='3'&&$productTypeSelectVal=='4') {//墙板下的镀锌钢板的钢板复合
			$strTH .= '<li>';
			$strTH .= '<div><i>*</i><span>安装方式：</span></div>';
			$strTH .= '<div class="check-list installation" id="installation">';
			$strTH .= '<label>';
			$strTH .= '<input   type="radio" name="installation" class="installation"  value="1" />';
			$strTH .= '<span>固定式</span>';
			$strTH .= '</label>';
			$strTH .= '<label>';
			$strTH .= '<input   type="radio" name="installation" class="installation"  value="2" />';
			$strTH .= '<span>可拆式</span>';
			$strTH .= '</label>';
			$strTH .= '</div>';
			$strTH .= '</li>';


			$strTH .= '<li id="surfacePreparation"  >';
			$strTH .= '<div><i>*</i><span>选择表面处理：</span></div>';
			$strTH .= ' <select  class="web-input surfacePreparationSelect" name="surfacePreparation" id="surfacePreparationSelect">';
			//			$strTH.=' <option value="0">请选择</option>';
			$strTH.=' <option value="1">聚酯喷涂</option>';
			$strTH.=' <option value="2">聚酯辊涂</option>';
			$strTH.=' <option value="3">氟碳喷涂</option>';
			$strTH.=' <option value="4">氟碳辊涂</option>';
			$strTH.=' <option value="5">木纹转印</option>';
			$strTH .= ' </select>';
			$strTH .= '</li>';

			$strTH .= ' <li id="colorNum"  >';
			$strTH .= ' <div><i>*</i><span>国际色号：</span></div>';
			$strTH .= '  <input type="text" class="web-input colorNum" name="colorNum"      />';
			$strTH .= '  </li>';

			$strTH .= ' <li id="standard"  >';
			$strTH .= ' <div><i>*</i><span>规格：</span></div>';
			$strTH .= '  <input type="text" class="web-input standard" name="standard"      />mm';
			$strTH .= '  </li>';

			$strTH .= ' <li id="liningMaterial"  >';
			$strTH .= ' <div><i>*</i><span>衬板材料：</span></div>';
			$strTH .= '  <input type="text" class="web-input liningMaterial" name="liningMaterial"      />';
			$strTH .= '  </li>';

			$strTH .= ' <li id="liningThickness"  >';
			$strTH .= ' <div><i>*</i><span>衬板厚度：</span></div>';
			$strTH .= '  <input type="text" class="web-input liningThickness" name="liningThickness"      />mm';
			$strTH .= '  </li>';

			$strTH .= ' <li id="stencilThickness"  >';
			$strTH .= ' <div><i>*</i><span>钢板厚度：</span></div>';
			$strTH .= '  <input type="text" class="web-input stencilThickness" name="stencilThickness"      />mm';
			$strTH .= '  </li>';

		}



		if($materialType=='2'&&$productTypeSelectVal=='2') {//墙板下的不锈钢的厚板
			$strTH .= '<li>';
			$strTH .= '<div><i>*</i><span>安装方式：</span></div>';
			$strTH .= '<div class="check-list installation" id="installation">';
			$strTH .= '<label>';
			$strTH .= '<input   type="radio" name="installation" class="installation"  value="1" />';
			$strTH .= '<span>固定式</span>';
			$strTH .= '</label>';
			$strTH .= '<label>';
			$strTH .= '<input   type="radio" name="installation" class="installation"  value="2" />';
			$strTH .= '<span>可拆式</span>';
			$strTH .= '</label>';
			$strTH .= '<label>';
			$strTH .= '<input   type="radio" name="installation" class="installation"  value="3" />';
			$strTH .= '<span>胶贴</span>';
			$strTH .= '</label>';
			$strTH .= '</div>';
			$strTH .= '</li>';


			$strTH .= '<li id="surfacePreparation"  >';
			$strTH .= '<div><i>*</i><span>选择表面处理：</span></div>';
			$strTH .= ' <select  class="web-input surfacePreparationSelect" name="surfacePreparation" id="surfacePreparationSelect">';
			//			$strTH.=' <option value="0">请选择</option>';
			$strTH.=' <option value="1">镜面</option>';
			$strTH.=' <option value="2">拉丝</option>';
			$strTH.=' <option value="3">喷砂</option>';
			$strTH .= ' </select>';
			$strTH .= '</li>';

			$strTH .= ' <li id="standard"  >';
			$strTH .= ' <div><i>*</i><span>规格：</span></div>';
			$strTH .= '  <input type="text" class="web-input standard" name="standard"      />mm';
			$strTH .= '  </li>';

			$strTH.=' <li id="thickness"  >';
			$strTH.=' <div><i>*</i><span>厚度：</span></div>';
			$strTH.='  <input type="text" class="web-input thickness" name="thickness"      />mm';
			$strTH.='  </li>';

		}


		if($materialType=='2'&&$productTypeSelectVal=='4') {//墙板下的不锈钢的蜂窝板
			$strTH .= '<li>';
			$strTH .= '<div><i>*</i><span>安装方式：</span></div>';
			$strTH .= '<div class="check-list installation" id="installation">';
			$strTH .= '<label>';
			$strTH .= '<input   type="radio" name="installation" class="installation"  value="1" />';
			$strTH .= '<span>固定式</span>';
			$strTH .= '</label>';
			$strTH .= '<label>';
			$strTH .= '<input   type="radio" name="installation" class="installation"  value="2" />';
			$strTH .= '<span>可拆式</span>';
			$strTH .= '</label>';
			$strTH .= '</div>';
			$strTH .= '</li>';

			$strTH .= '<li id="surfacePreparation"  >';
			$strTH .= '<div><i>*</i><span>选择表面处理：</span></div>';
			$strTH .= ' <select  class="web-input surfacePreparationSelect" name="surfacePreparation" id="surfacePreparationSelect">';
			//			$strTH.=' <option value="0">请选择</option>';
			$strTH.=' <option value="1">镜面</option>';
			$strTH.=' <option value="2">拉丝</option>';
			$strTH.=' <option value="3">喷砂</option>';
			$strTH .= ' </select>';
			$strTH .= '</li>';

			$strTH .= ' <li id="standard"  >';
			$strTH .= ' <div><i>*</i><span>规格：</span></div>';
			$strTH .= '  <input type="text" class="web-input standard" name="standard"      />mm';
			$strTH .= '  </li>';

			$strTH .= ' <li id="panelThickness"  >';
			$strTH .= ' <div><i>*</i><span>面板厚度：</span></div>';
			$strTH .= '  <input type="text" class="web-input panelThickness" name="panelThickness"      />mm';
			$strTH .= '  </li>';

			$strTH .= ' <li id="backplaneThickness"  >';
			$strTH .= ' <div><i>*</i><span>背板厚度：</span></div>';
			$strTH .= '  <input type="text" class="web-input backplaneThickness" name="backplaneThickness"      />mm';
			$strTH .= '  </li>';

			$strTH .= ' <li id="coreThickness"  >';
			$strTH .= ' <div><i>*</i><span>芯材厚度：</span></div>';
			$strTH .= '  <input type="text" class="web-input coreThickness" name="coreThickness"      />mm';
			$strTH .= '  </li>';

			$strTH .= ' <li id="totalThickness"  >';
			$strTH .= ' <div><i>*</i><span>总厚度：</span></div>';
			$strTH .= '  <input type="text" class="web-input totalThickness" name="totalThickness"      />mm';
			$strTH .= '  </li>';

		}



//		if ($productTypeSelectVal == 3) {//墙板下的蜂窝板
//
//
//			$strTH .= ' <li id="panelThickness"  >';
//			$strTH .= ' <div><i>*</i><span>面板厚度：</span></div>';
//			$strTH .= '  <input type="text" class="web-input panelThickness" name="panelThickness"      />mm';
//			$strTH .= '  </li>';
//
//			$strTH .= ' <li id="backplaneThickness"  >';
//			$strTH .= ' <div><i>*</i><span>背板厚度：</span></div>';
//			$strTH .= '  <input type="text" class="web-input backplaneThickness" name="backplaneThickness"      />mm';
//			$strTH .= '  </li>';
//
//			$strTH .= ' <li id="coreThickness"  >';
//			$strTH .= ' <div><i>*</i><span>芯材厚度：</span></div>';
//			$strTH .= '  <input type="text" class="web-input coreThickness" name="coreThickness"      />mm';
//			$strTH .= '  </li>';
//
//			$strTH .= ' <li id="totalThickness"  >';
//			$strTH .= ' <div><i>*</i><span>总厚度：</span></div>';
//			$strTH .= '  <input type="text" class="web-input totalThickness" name="totalThickness"      />mm';
//			$strTH .= '  </li>';
//
//		}
//
//		if ($productTypeSelectVal == 4) {//墙板下的钢板复合
//			$strTH.='<li id="surfacePreparation"  >';
//			$strTH.='<div><i>*</i><span>选择表面处理：</span></div>';
//			$strTH.=' <select  class="web-input" name="surfacePreparation" id="surfacePreparationSelect">';
////			$strTH.=' <option value="0">请选择</option>';
//			$strTH.=' <option value="1">聚酯喷涂</option>';
//			$strTH.=' <option value="2">聚酯辊涂</option>';
//			$strTH.=' <option value="3">氟碳喷涂</option>';
//			$strTH.=' <option value="4">氟碳辊涂</option>';
//			$strTH.=' <option value="5">木纹转印</option>';
//			$strTH.=' </select>';
//			$strTH.='</li>';
//
//			$strTH .= ' <li id="liningMaterial"  >';
//			$strTH .= ' <div><i>*</i><span>衬板材料：</span></div>';
//			$strTH .= '  <input type="text" class="web-input liningMaterial" name="liningMaterial"      />';
//			$strTH .= '  </li>';
//
//			$strTH .= ' <li id="liningThickness"  >';
//			$strTH .= ' <div><i>*</i><span>衬板厚度：</span></div>';
//			$strTH .= '  <input type="text" class="web-input liningThickness" name="liningThickness"      />mm';
//			$strTH .= '  </li>';
//
//			$strTH .= ' <li id="stencilThickness"  >';
//			$strTH .= ' <div><i>*</i><span>钢板厚度：</span></div>';
//			$strTH .= '  <input type="text" class="web-input stencilThickness" name="stencilThickness"      />mm';
//			$strTH .= '  </li>';
//
//		}






	}//end墙板


	echo $strTH;
	exit();
}









/**
 * 踢脚线下 点击材料类型
 */
protected function _showTJXsurfacePreparation(){
	$materialListVal= $this->getParam('materialListVal');//用户选中的材料类型值

	$strTH = "";
	if($materialListVal=='1'){//点击铝合金
		$strTH.='<li id="surfacePreparation"  >';
		$strTH.='<div><i>*</i><span>选择表面处理：</span></div>';
		$strTH.=' <select  class="web-input surfacePreparationSelect" name="surfacePreparation" id="surfacePreparationSelect" onchange="showTXJColorNum(this)">';
			$strTH.=' <option value="0">请选择</option>';
		$strTH.=' <option value="1">聚酯喷涂</option>';
		$strTH.=' <option value="2">氟碳喷涂</option>';
		$strTH.=' <option value="3">拉丝点击氧化</option>';
		$strTH.=' <option value="4">木纹转印</option>';
		$strTH.=' </select>';
		$strTH.='</li>';
	}else	if($materialListVal=='2'){//点击不锈钢
		$strTH.='<li id="surfacePreparation"  >';
		$strTH.='<div><i>*</i><span>选择表面处理：</span></div>';
		$strTH.=' <select  class="web-input surfacePreparationSelect" name="surfacePreparation" id="surfacePreparationSelect" onchange="showTXJColorNum(this)">';
			$strTH.=' <option value="0">请选择</option>';
		$strTH.=' <option value="1">镜面</option>';
		$strTH.=' <option value="2">拉丝</option>';
		$strTH.=' <option value="3">喷砂</option>';
		$strTH.=' </select>';
		$strTH.='</li>';
	}

	echo $strTH;
	exit();
}





/**
 * 踢脚线下 点击表面处理
 */
protected function _showTXJColorNum(){
	$strTH = "";
	$strTH .= ' <li id="TcolorNum"  >';
	$strTH .= ' <div><i>*</i><span>国际色号：</span></div>';
	$strTH .= '  <input type="text" class="web-input TcolorNum" name="TcolorNum"      />';
	$strTH .= '  </li>';

	echo $strTH;
	exit();
}




/**
 * 窗帘下 点击材料类型
 */
protected function _showCLproductType(){
	$strTH = "";

	$strTH.='<li id="productType"  >';
	$strTH.='<div><i>*</i><span>产品类型：</span></div>';
	$strTH.=' <select  class="web-input productTypeSelect" name="productType" id="productTypeSelect">';
//			$strTH.=' <option value="0">请选择</option>';
	$strTH.=' <option value="1">冲孔</option>';
	$strTH.=' <option value="2">平面</option>';
	$strTH.=' </select>';
	$strTH.='</li>';

	$strTH .= ' <li id="aluminumSheetThickness"  >';
	$strTH .= ' <div><i>*</i><span>铝片厚度：</span></div>';
	$strTH .= '  <input type="text" class="web-input aluminumSheetThickness" name="aluminumSheetThickness"      />mm';
	$strTH .= '  </li>';


	echo $strTH;
	exit();
}



/**
 * 墙板下 点击材料类型
 */
protected function _showQBproductType(){
	$strTH = "";
	$materialListVal= $this->getParam('materialListVal');
	if($materialListVal=='1'){
		$strTH.='<li id="productType"  >';
		$strTH.='<div><i>*</i><span>产品类型：</span></div>';
		$strTH.=' <select  class="web-input productTypeSelect" name="productType" id="productTypeSelect" onchange="showBelow(this)">';
		$strTH.=' <option value="0">请选择</option>';
		$strTH.=' <option value="2">铝单板</option>';
		$strTH.=' <option value="3">蜂窝板</option>';
		$strTH.=' <option value="4">铝板复合</option>';
		;
		$strTH.=' </select>';
		$strTH.='</li>';
	}elseif($materialListVal=='2'){
		$strTH.='<li id="productType"  >';
		$strTH.='<div><i>*</i><span>产品类型：</span></div>';
		$strTH.=' <select  class="web-input productTypeSelect" name="productType" id="productTypeSelect" onchange="showBelow(this)">';
		$strTH.=' <option value="0">请选择</option>';
		$strTH.=' <option value="2">厚板</option>';
		$strTH.=' <option value="4">蜂窝板</option>';
		$strTH.=' </select>';
		$strTH.='</li>';
	}elseif($materialListVal=='3'){
		$strTH.='<li id="productType"  >';
		$strTH.='<div><i>*</i><span>产品类型：</span></div>';
		$strTH.=' <select  class="web-input productTypeSelect" name="productType" id="productTypeSelect" onchange="showBelow(this)">';
		$strTH.=' <option value="0">请选择</option>';
		$strTH.=' <option value="2">蜂窝板</option>';
		$strTH.=' <option value="4">钢板复合</option>';
		$strTH.=' </select>';
		$strTH.='</li>';
	}

	echo $strTH;
	exit();


}




	/**
	 * enquiry2保存
	 */
	protected function _save(){

		$id = $this->getParam('id','t');

		if( !empty($id) ){


			$resId = $this->getParam('resId');

//			#数据组合
//			if($this->getParam('materialType', 'i')){
//				$data['secondType'] = $this->getParam('materialType', 'i');#材料类型
//			}elseif($this->getParam('luminaireType', 'i')){
//				$data['secondType'] = $this->getParam('luminaireType', 'i');#灯具类型
//			}elseif($this->getParam('tuyereType', 'i')){
//				$data['secondType'] = $this->getParam('tuyereType', 'i');#风口类型
//			}
//
//			$data['productCategory'] = $productCategory;
//			$data['productType'] = $this->getParam('productType');#
//			$data['num'] = $this->getParam('num', 'i');#
//			$data['size'] = $this->getParam('size', 'i');#
			$intLoadId = $this->session()->getSession('front_uid');
			$data['userId'] = $intLoadId;#
			$data['enqId'] = $id;#
			$data['firstTime'] = time();#
			$data['productAttr'] = array(
					'productCategory'=>$this->getParam('productCategory','t'),
					'materialType'=>$this->getParam('materialType','t'),
					'luminaireType'=>$this->getParam('luminaireType','t'),
					'tuyereType'=>$this->getParam('tuyereType','t'),
					'productType'=>$this->getParam('productType','t'),
					'installation'=>$this->getParam('installation','t'),
					'surfacePreparationSelect'=>$this->getParam('surfacePreparationSelect','t'),
					'TsurfacePreparationSelect'=>$this->getParam('TsurfacePreparationSelect','t'),
					'colorNum'=>$this->getParam('colorNum','t'),
					'TcolorNum'=>$this->getParam('TcolorNum','t'),
					'standard'=>$this->getParam('standard','t'),
					'thickness'=>$this->getParam('thickness','t'),
					'panelThickness'=>$this->getParam('panelThickness','t'),
					'backplaneThickness'=>$this->getParam('backplaneThickness','t'),
					'coreThickness'=>$this->getParam('coreThickness','t'),
					'totalThickness'=>$this->getParam('totalThickness','t'),
					'corrugatedCoreThickness'=>$this->getParam('corrugatedCoreThickness','t'),
					'corrugatedCoreHeight'=>$this->getParam('corrugatedCoreHeight','t'),
					'bottomWidth'=>$this->getParam('bottomWidth','t'),
					'height'=>$this->getParam('height','t'),
					'liningMaterial'=>$this->getParam('liningMaterial','t'),
					'liningThickness'=>$this->getParam('liningThickness','t'),
					'aluminumSheetThickness'=>$this->getParam('aluminumSheetThickness','t'),
					'aluminumPlateThickness'=>$this->getParam('aluminumPlateThickness','t'),
					'stencilThickness'=>$this->getParam('stencilThickness','t'),
					'power'=>$this->getParam('power','t'),
					'fitSmallpoxType'=>$this->getParam('fitSmallpoxType','t'),
					'num'=>$this->getParam('num','t'),
					'size'=>$this->getParam('size','t'),
					'tjxheight'=>$this->getParam('tjxheight','t'),

			           );#


			if(empty($resId)){//保存
				$insertId=DB::insert("sc_enquiry_product",$data,true) ;
			}else{//编辑
				DB::update("sc_enquiry_product",'id = '.$resId,$data);
				$insertId = $resId;
			}

//			die(DB::echoExeSql());

			if($insertId){//保存
				echo $insertId;
				die();
			} else {//失败
				die('0');
			}

		}
	}







	/**
	 * enquiry2删除
	 */
	protected function _del(){

		$resId = $this->getParam('resId','t');
		if(isset($resId) && !empty($resId) ){
			if(strpos($resId,',')){
				$where = "id in (".$resId.")";
			}else{
				$where = "id = {$resId}";
			}
			$sql = "delete from sc_enquiry_product where  ".$where;
			$result=DB::execute($sql);
//die(DB::echoExeSql());
			if($result){
				die('1');
			} else {
				die('0');
			}
		}else{ //参数错误
			die('2');
		}
	}






	/**
	 * enquiry2下一步验证
	 */
	protected function  _checkStep(){

		$id = $this->getParam('id','t');

		$sql='SELECT COUNT(*) as SUM from sc_enquiry_product WHERE enqId='.$id;


		$result = DB::select($sql);
//die(DB::echoExeSql());
		if($result[0]['SUM']>0){  //在表中查询到数据
			die($result[0]['SUM']);
		} else {//在表中未查询到数据
			die('0');
		}

	}
	
	
	
	/**
	 * 获取报价内容
	 */
	protected function  _getpriceinfo(){

		$pid = $this->getParam('pid');
		$unit = $this->getParam('unit');
		
		$unit = $unit?$unit:1;
		
		if(empty($pid) || empty($unit)){
			die('error_null');
		}
		
		
		if($_SERVER["REQUEST_METHOD"] === "POST") {
			$sql = 'select id,userId,quote_price,quote_unit,quote_explain,quote_time from sc_enquiry_product where quote_time > 0 and id  = '.$pid.' limit 1';
			$arrData = DB::select($sql);
			$strPriceVal = '未报价';
			$strPriceExpVal = '';
			$unitlist =  array('','元/m2','元/m2','元/个','元/个','元/m','元/m2');
			if($arrData){
				$strPriceVal = $arrData[0]['QUOTE_PRICE'];
				$strPriceExpVal = $arrData[0]['QUOTE_EXPLAIN'];	
			}
			
			$htmlContent = '';
	
			$htmlContent.= '<div class="price-popup-box" >';
			
			$htmlContent.= '<table cellspacing="1" cellpadding="0" border="0">';
			$htmlContent.= '<tbody>';
			$htmlContent.= '<tr>';
			$htmlContent.= '<td class="one">报价：</td>';
			$htmlContent.= '<td class="two oneh">'.$strPriceVal.$unitlist[$unit].'</td>';
			$htmlContent.= '</tr>';
			$htmlContent.= '<tr class="twot">';
			$htmlContent.= '<td class="one">附加说明：</td>';
			$htmlContent.= '<td class="two twoh">'.$strPriceExpVal.'</td> ';
			$htmlContent.= '</tr>';
			$htmlContent.= '</tbody>';
			$htmlContent.= '</table>';
			$htmlContent.= ' </div>';
			
			die($htmlContent);
		}
		

		die('error');

	}












}
?>
